/**
 * VideoButtons 组件样式
 */

.video-buttons {
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  max-height: 600px;
  overflow-y: auto;
}

.video-buttons.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #6c757d;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e9ecef;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 头部信息 */
.video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dee2e6;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-info h3 {
  margin: 0;
  font-size: 18px;
  color: #495057;
}

.video-count {
  background: #e9ecef;
  color: #6c757d;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.refresh-btn {
  padding: 6px 12px;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.refresh-btn:hover {
  background: #218838;
}

/* 视频区块 */
.video-section {
  margin-bottom: 24px;
}

.video-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #6c757d;
  font-weight: 500;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

/* 视频按钮 */
.video-btn {
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.video-btn:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.video-btn.active {
  border-color: #007bff;
  background: #f8f9ff;
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 100px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 32px;
  color: #adb5bd;
}

.playing-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 123, 255, 0.9);
  color: white;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 10px;
}

.video-info {
  flex: 1;
}

.video-name {
  font-weight: 500;
  color: #495057;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #6c757d;
}

.video-meta span {
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 10px;
}

/* 上传按钮 */
.upload-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  background: white;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-btn:hover {
  border-color: #007bff;
  background: #f8f9ff;
}

.upload-icon {
  font-size: 24px;
  color: #6c757d;
}

.upload-text {
  text-align: left;
}

.primary-text {
  font-weight: 500;
  color: #495057;
  margin-bottom: 2px;
}

.secondary-text {
  font-size: 12px;
  color: #6c757d;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  color: #6c757d;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-text div:first-child {
  font-weight: 500;
  margin-bottom: 4px;
}

.empty-text div:last-child {
  font-size: 12px;
  opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }
  
  .video-btn {
    padding: 8px;
  }
  
  .video-thumbnail {
    height: 80px;
  }
}
